<?php

declare(strict_types=1);

namespace App\Request;

use Hyperf\Validation\Request\FormRequest;
use Hyperf\Validation\Rule;

class StoreMaterialProjectRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'name' => 'required',
            //'file_type' => 'required',
            'material_id' => 'required',
            'description' => 'required',
        ];
    }

    public function attributes(): array
    {
        return [
            'name' => '项目名称',
            //'file_type' => '上传文件类型',
            'material_id' => '清单id',
            'description' => '项目描述'
        ];
    }
}
